/*
 * @Description: Dog
 * @Author: rendc
 * @Date: 2023-11-22 16:44:45
 * @LastEditors: rendc
 * @LastEditTime: 2023-11-22 19:11:44
 */
public class Dog extends Animal{
  // 子类独有的特性
  private String name;
  // 子类新增一个和父类同名的成员变量 int age
  private int age = 20;
  public int getDogAge(){
    System.out.println("age: " + age);
    System.out.println("this.age: " + this.age);
    System.out.println("super.age: " + super.age);
    return age;
  }
  // get、set
  public String getName(){
    System.out.println("name：" + name);
    return name;
  }
  public void setName(String name){
    this.name = name;
  }
  public void show(){
    // System.out.println("[dog]color:"+color);
    System.out.println("[dog]age:"+age);
    System.out.println("[dog]name:"+name);
  }
}